<?php
	/*** the page title ***/
        $this->headTitle($this->title);

     ?>
<br>
<div id="result">
<?php echo $this->message ?>
</div>
<form id="mailform" method="post" action="<?php echo $this->url(array( 'controller' => 'contact'),'default', true) ?>" enctype="multipart/form-data" >
    <table>
        <tbody>
            <tr>
                <td><label>Send To: <img src="images/redStar.gif"/></label></td>
                 <td><select name="recipient" id="recipient">
                        <option value="">[-- Select --]</option>
                        <option value="hoaboard@rosemoorelake.org">HOA Board</option>
                        <option value="webmaster@rosemoorelake.org">Webmaster</option>
                        <option value="welcomecommittee@rosemoorelake.org">Pool Committee</option>
                        <option value="welcomecommittee@rosemoorelake.org">Social Committee</option>
                 </select><span id="recipienterror" class="error"></span></td>
            </tr>
             <tr>
                <td>   <label>Name:<img src="images/redStar.gif"/></label></td>
                 <td> <input type ="text" name="name" id="name" size="40" value="<?php (isset($_POST['name'])?$_POST['name']:'') ?>"/><span id="nameerror" class="error"></span></td>
            </tr>
             <tr>
                <td><label>Email:<img src="images/redStar.gif"/></label></td>
                 <td>   <input type ="text" name="mail" id="mail" size="40" <?php (isset($_POST['mail'])?$_POST['mail']:'') ?>/><span id="mailerror" class="error"></span></td>
            </tr>
             <tr>
                <td>  <label>Phone:</label></td>
                 <td><input type ="text" name="phone" id="phone" size="40" <?php (isset($_POST['phone'])?$_POST['phone']:'') ?>/></td>
            </tr>
             <tr>
                <td> <label>Subject:<img src="images/redStar.gif"/></label></td>
                 <td>   <input type ="text" name="subject" id="subject"size="40" <?php (isset($_POST['subject'])?$_POST['subject']:'') ?>/><span id="subjecterror" class="error"></span></td>
            </tr>
             <tr>
                <td><label>Attachment:</label></td>
                 <td><input type ="file" name="uploaded_file" class="file"  id="uploaded_file"size="40"/><span id="subjecterror" class="error"></span></td>
            </tr>
             <tr>
                <td>   <label>How can we help?<img src="images/redStar.gif"/></label></td>
                 <td><textarea name ="emailBody" id="emailBody" cols="60" rows="7"><?php (isset($_POST['emailbody'])?$_POST['emailbody']:'') ?></textarea><span id="emailBodyerror" class="error"></span></td>
            </tr>
            <tr>
                <td colspan="2" align="center"><br>
                       <input type="submit" value="Send Email" id="sendmail" name="sendmail"/>
                </td>
            </tr>
        </tbody>
    </table>
   <input type="hidden" name="action" value="_save"/>
</form>
<div id="contactus"></div>


<script>
    $(document).ready(function(){
        $("li a#contact").addClass("active");
      });
 </script>
